Skip to content

chore(submodule): bump tn-contracts to 0fb6b01 and regenerate mainnet chain-configs - #1206

Merged
grantkee merged 2 commits into
mainfrom
chore/bump-tn-contracts-169
Aug 17, 2026
Merged

chore(submodule): bump tn-contracts to 0fb6b01 and regenerate mainnet chain-configs#1206
grantkee merged 2 commits into
mainfrom
chore/bump-tn-contracts-169

Conversation

@Huwonk

@Huwonk Huwonk commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bumps the tn-contracts submodule from dc248c0 to master head 0fb6b01, and regenerates the mainnet chain-config placeholders that the bump strands.

What comes in

Two consensus fixes land on top of the split-boundary pin:

  • #165 holds delegated EOAs to their secp256k1 key in delegateStake. A validator's EIP-7702 wallet program is revocable and the delegation digest is public, so that program is never accepted as a stand-in for the key. The designator is matched by its 0xef0100 prefix rather than by code size, since a delegated EOA carries 23 bytes of code.
  • #169 screens never-staked entries out of applySlashes (a zero balance would otherwise fall through to the ejection branch, burning a nonexistent token and stalling the boundary), closes the immediate Staked settlement window, and gives every recipient-facing push a gas cap with a claimRefund fallback.

Impact on the engine

None to the call surface. The ABI delta is purely additive - claimableRewards(address) - and the three epoch-boundary system-call selectors are unchanged, so the applyIncentives -> applySlashes -> concludeEpoch sequencing from #1012 needs no rework. #169's slash screening is contract-side and does not move the ordering contract the client drives.

Why chain-configs/mainnet is rewritten

The genesis ceremony splices the artifact's deployedBytecode into the ConsensusRegistry account while the node's system calls speak the current ABI, so bumping the artifact leaves the committed mainnet genesis carrying stale code. mainnet_genesis_registry_code_matches_current_artifact catches exactly this (34305 bytes seeded vs 35248 deployed), and it is the failure mode behind #1063: a mainnet node could neither start epoch 0 nor close an epoch.

The second commit is the output of the documented lever, cargo test -p telcoin-network-cli regenerate_mainnet_chain_configs -- --ignored.

Reviewer note: the diff to genesis.yaml and committee.yaml is wholesale rather than a one-line code swap. The ceremony mints fresh placeholder validator keys because the committed identities' proof-of-possession signatures cannot be reproduced, and the genesis timestamp moves. That churn is inherent to the lever, not hand-editing. chain-configs/README.md documents these four identities as placeholders until the real mainnet ceremony. parameters.yaml regenerated identically and is unchanged. Testnet has no equivalent gate and is deliberately untouched.

Verifying the artifacts are not stale

Committed artifacts in tn-contracts are regenerated by hand and have trailed source before, so this was checked rather than assumed. Recompiling tn-contracts at 0fb6b01 reproduces all six committed artifacts byte-identically in deployedBytecode.object, init bytecode, and ABI. bytecode_hash = "none" plus a pinned solc 0.8.35 make that comparison exact. The JSON files do differ under a newer forge, but only in sourceMap, metadata, and id, which nothing here consumes.

Attestation

Attested at 0eb21fb2: 0x0b688cd0...4e9fec, block 317241.

Stage Result
archive-mode guard, fmt, clippy (default + all-features) passed
workspace suite 1438/1438, 26 skipped
adiri-feature lane 421/421
e2e (ignored-only) 21/21, 4 skipped

Huwonk added 2 commits August 17, 2026 13:18
Picks up two consensus fixes on top of the split-boundary pin:

- #165 holds delegated EOAs to their secp256k1 key in delegateStake,
  matching the EIP-7702 designator by its 0xef0100 prefix so a revocable
  wallet program is never accepted as a stand-in for the key.
- #169 screens never-staked entries out of applySlashes, closes the
  immediate Staked settlement window, and gives every recipient-facing
  push a gas cap with a claimRefund fallback.

The embedded ConsensusRegistry ABI change is additive
(claimableRewards(address)); the three system-call selectors the engine
drives at the epoch boundary are unchanged.
…istry

The bumped ConsensusRegistry artifact deploys 35248 bytes of runtime code
where the committed mainnet genesis seeded 34305, which the tn-config gate
catches: a node splices the artifact's deployedBytecode into the registry
account at genesis but speaks the current ABI in its system calls, so a
stale blob leaves mainnet unable to start or close an epoch (#1063).

Regenerated with the documented lever, `cargo test -p telcoin-network-cli
regenerate_mainnet_chain_configs -- --ignored`. The placeholder validator
keys are freshly minted because the ceremony cannot reproduce the previous
proof-of-possession signatures; chain-configs/README.md documents these
four identities as placeholders until the real mainnet ceremony.
parameters.yaml regenerated identically and is unchanged.
@Huwonk
Huwonk requested a review from grantkee August 17, 2026 18:45
@Huwonk Huwonk self-assigned this Aug 17, 2026
@Huwonk
Huwonk requested review from MavenRain and sstanfield August 17, 2026 18:45
@Huwonk
Huwonk deployed to merge-into-main August 17, 2026 18:45 — with GitHub Actions Active
@grantkee
grantkee merged commit aec76b5 into main Aug 17, 2026
14 of 24 checks passed
@grantkee
grantkee deleted the chore/bump-tn-contracts-169 branch August 17, 2026 21:17
MavenRain added a commit that referenced this pull request Aug 19, 2026
…-network into fix/1160-enforce-txfeecap

Resolve the one conflict in crates/tn-reth/src/env/genesis.rs. The branch
routes temp-chain RPC args through the `new_for_temp_chain_with_rpc_args`
test seam; main (#1172, issue #1165) disables the IPC server for temp chains
and seeds reth's process-global defaults before the first
`RpcServerArgs::default()` read. Keep both:

- `new_for_temp_chain` calls `init_reth_defaults()` before it constructs its
  args, then passes `RpcServerArgs { ipcdisable: true, ..Default::default() }`
  into the seam, so the default temp chain still runs with IPC off and does
  not fix reth's `ipcpath` for the rest of the process;
- the seam injects the args as given, `ipcdisable` included: the fee-cap RPC
  tests build their modules from `RpcServerArgs::default()` (IPC-only module
  set, no socket bound; only `start_rpc` binds), so forcing IPC off there
  would leave them with no `eth` namespace;
- a test pins the pass-through (fee cap reaches the node config, caller's
  `ipcdisable` untouched).

Sync the tn-contracts submodule to main's pointer (0fb6b01, #1206).

Signed-off-by: Onyeka Obi <softwareengineerasaservant@isurvivable.cv>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants